home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / CIncludes / IntlResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  13.2 KB  |  383 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        IntlResources.h
  3.  
  4.      Contains:    International Resource definitions.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1983-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __INTLRESOURCES__
  19. #define __INTLRESOURCES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47.  
  48. enum {
  49.                                                                 /* Bits in the itlcFlags byte */
  50.     itlcShowIcon                = 7,                            /*Show icon even if only one script*/
  51.     itlcDualCaret                = 6,                            /*Use dual caret for mixed direction text*/
  52.                                                                 /* Bits in the itlcSysFlags word */
  53.     itlcSysDirection            = 15                            /*System direction - left to right/right to left*/
  54. };
  55.  
  56.  
  57.  
  58. enum {
  59.     tokLeftQuote                = 1,                            /* NumberParts.data[] enumerators                                             */
  60.     tokRightQuote                = 2,                            /*  In general, these are NOT to be considered indices into the data[] array */
  61.     tokLeadPlacer                = 3,
  62.     tokLeader                    = 4,
  63.     tokNonLeader                = 5,
  64.     tokZeroLead                    = 6,
  65.     tokPercent                    = 7,
  66.     tokPlusSign                    = 8,
  67.     tokMinusSign                = 9,
  68.     tokThousands                = 10,
  69.     tokReserved                    = 11,                            /* 11 is reserved field */
  70.     tokSeparator                = 12,
  71.     tokEscape                    = 13,
  72.     tokDecPoint                    = 14,
  73.     tokEPlus                    = 15,
  74.     tokEMinus                    = 16,
  75.     tokMaxSymbols                = 31,
  76.     curNumberPartsVersion        = 1                                /*current version of NumberParts record*/
  77. };
  78.  
  79.  
  80. enum {
  81.     currSymLead                    = 16,
  82.     currNegSym                    = 32,
  83.     currTrailingZ                = 64,
  84.     currLeadingZ                = 128
  85. };
  86.  
  87.  
  88. enum {
  89.     mdy                            = 0,
  90.     dmy                            = 1,
  91.     ymd                            = 2,
  92.     myd                            = 3,
  93.     dym                            = 4,
  94.     ydm                            = 5
  95. };
  96.  
  97. typedef SInt8                             DateOrders;
  98.  
  99. enum {
  100.     timeCycle24                    = 0,                            /*time sequence 0:00 - 23:59*/
  101.     timeCycleZero                = 1,                            /*time sequence 0:00-11:59, 0:00 - 11:59*/
  102.     timeCycle12                    = 255,                            /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
  103.     zeroCycle                    = 1,                            /*old name for timeCycleZero*/
  104.     longDay                        = 0,                            /*day of the month*/
  105.     longWeek                    = 1,                            /*day of the week*/
  106.     longMonth                    = 2,                            /*month of the year*/
  107.     longYear                    = 3,                            /*year*/
  108.     supDay                        = 1,                            /*suppress day of month*/
  109.     supWeek                        = 2,                            /*suppress day of week*/
  110.     supMonth                    = 4,                            /*suppress month*/
  111.     supYear                        = 8,                            /*suppress year*/
  112.     dayLdingZ                    = 32,
  113.     mntLdingZ                    = 64,
  114.     century                        = 128,
  115.     secLeadingZ                    = 32,
  116.     minLeadingZ                    = 64,
  117.     hrLeadingZ                    = 128
  118. };
  119.  
  120. /* move OffsetTable to QuickdrawText */
  121.  
  122. struct Intl0Rec {
  123.     char                             decimalPt;                    /*decimal point character*/
  124.     char                             thousSep;                    /*thousands separator character*/
  125.     char                             listSep;                    /*list separator character*/
  126.     char                             currSym1;                    /*currency symbol*/
  127.     char                             currSym2;
  128.     char                             currSym3;
  129.     UInt8                             currFmt;                    /*currency format flags*/
  130.     UInt8                             dateOrder;                    /*order of short date elements: mdy, dmy, etc.*/
  131.     UInt8                             shrtDateFmt;                /*format flags for each short date element*/
  132.     char                             dateSep;                    /*date separator character*/
  133.     UInt8                             timeCycle;                    /*specifies time cycle: 0..23, 1..12, or 0..11*/
  134.     UInt8                             timeFmt;                    /*format flags for each time element*/
  135.     char                             mornStr[4];                    /*trailing string for AM if 12-hour cycle*/
  136.     char                             eveStr[4];                    /*trailing string for PM if 12-hour cycle*/
  137.     char                             timeSep;                    /*time separator character*/
  138.     char                             time1Suff;                    /*trailing string for AM if 24-hour cycle*/
  139.     char                             time2Suff;
  140.     char                             time3Suff;
  141.     char                             time4Suff;
  142.     char                             time5Suff;                    /*trailing string for PM if 24-hour cycle*/
  143.     char                             time6Suff;
  144.     char                             time7Suff;
  145.     char                             time8Suff;
  146.     UInt8                             metricSys;                    /*255 if metric, 0 if inches etc.*/
  147.     short                             intl0Vers;                    /*region code (hi byte) and version (lo byte)*/
  148. };
  149. typedef struct Intl0Rec                    Intl0Rec;
  150.  
  151. typedef Intl0Rec *                        Intl0Ptr;
  152. typedef Intl0Ptr *                        Intl0Hndl;
  153.  
  154. struct Intl1Rec {
  155.     Str15                             days[7];                    /*day names*/
  156.     Str15                             months[12];                    /*month names*/
  157.     UInt8                             suppressDay;                /*255 for no day, or flags to suppress any element*/
  158.     UInt8                             lngDateFmt;                    /*order of long date elements*/
  159.     UInt8                             dayLeading0;                /*255 for leading 0 in day number*/
  160.     UInt8                             abbrLen;                    /*length for abbreviating names*/
  161.     char                             st0[4];                        /*separator strings for long date format*/
  162.     char                             st1[4];
  163.     char                             st2[4];
  164.     char                             st3[4];
  165.     char                             st4[4];
  166.     short                             intl1Vers;                    /*region code (hi byte) and version (lo byte)*/
  167.     short                             localRtn[1];                /*now a flag for opt extension*/
  168. };
  169. typedef struct Intl1Rec                    Intl1Rec;
  170.  
  171. typedef Intl1Rec *                        Intl1Ptr;
  172. typedef Intl1Ptr *                        Intl1Hndl;
  173. /*fields for optional itl1 extension*/
  174.  
  175. struct Itl1ExtRec {
  176.     Intl1Rec                         base;                        /*un-extended Intl1Rec*/
  177.     short                             version;
  178.     short                             format;
  179.     short                             calendarCode;                /*calendar code for this itl1 resource*/
  180.     long                             extraDaysTableOffset;        /*offset in itl1 to extra days table*/
  181.     long                             extraDaysTableLength;        /*length of extra days table*/
  182.     long                             extraMonthsTableOffset;        /*offset in itl1 to extra months table*/
  183.     long                             extraMonthsTableLength;        /*length of extra months table*/
  184.     long                             abbrevDaysTableOffset;        /*offset in itl1 to abbrev days table*/
  185.     long                             abbrevDaysTableLength;        /*length of abbrev days table*/
  186.     long                             abbrevMonthsTableOffset;    /*offset in itl1 to abbrev months table*/
  187.     long                             abbrevMonthsTableLength;    /*length of abbrev months table*/
  188.     long                             extraSepsTableOffset;        /*offset in itl1 to extra seps table*/
  189.     long                             extraSepsTableLength;        /*length of extra seps table*/
  190.     short                             tables[1];                    /*now a flag for opt extension*/
  191. };
  192. typedef struct Itl1ExtRec                Itl1ExtRec;
  193.  
  194. struct UntokenTable {
  195.     short                             len;
  196.     short                             lastToken;
  197.     short                             index[256];                    /*index table; last = lastToken*/
  198. };
  199. typedef struct UntokenTable                UntokenTable;
  200. typedef UntokenTable *                    UntokenTablePtr;
  201. typedef UntokenTablePtr *                UntokenTableHandle;
  202.  
  203. union WideChar {
  204.     char                             a[2];                        /*0 is the high order character*/
  205.     short                             b;
  206. };
  207. typedef union WideChar                    WideChar;
  208.  
  209. struct WideCharArr {
  210.     short                             size;
  211.     WideChar                         data[10];
  212. };
  213. typedef struct WideCharArr                WideCharArr;
  214.  
  215. struct NumberParts {
  216.     short                             version;
  217.     WideChar                         data[31];                    /*index by [tokLeftQuote..tokMaxSymbols]*/
  218.     WideCharArr                     pePlus;
  219.     WideCharArr                     peMinus;
  220.     WideCharArr                     peMinusPlus;
  221.     WideCharArr                     altNumTable;
  222.     char                             reserved[20];
  223. };
  224. typedef struct NumberParts                NumberParts;
  225. typedef NumberParts *                    NumberPartsPtr;
  226.  
  227.  
  228. struct Itl4Rec {
  229.     short                             flags;                        /*reserved*/
  230.     long                             resourceType;                /*contains 'itl4'*/
  231.     short                             resourceNum;                /*resource ID*/
  232.     short                             version;                    /*version number*/
  233.     long                             resHeader1;                    /*reserved*/
  234.     long                             resHeader2;                    /*reserved*/
  235.     short                             numTables;                    /*number of tables, one-based*/
  236.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  237.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  238.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  239.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  240.     long                             defPartsOffset;                /*offset to default number parts table*/
  241.     long                             resOffset6;                    /*reserved*/
  242.     long                             resOffset7;                    /*reserved*/
  243.     long                             resOffset8;                    /*reserved*/
  244. };
  245. typedef struct Itl4Rec                    Itl4Rec;
  246.  
  247. typedef Itl4Rec *                        Itl4Ptr;
  248. typedef Itl4Ptr *                        Itl4Handle;
  249. /* New NItl4Rec for System 7.0: */
  250.  
  251. struct NItl4Rec {
  252.     short                             flags;                        /*reserved*/
  253.     long                             resourceType;                /*contains 'itl4'*/
  254.     short                             resourceNum;                /*resource ID*/
  255.     short                             version;                    /*version number*/
  256.     short                             format;                        /*format code*/
  257.     short                             resHeader;                    /*reserved*/
  258.     long                             resHeader2;                    /*reserved*/
  259.     short                             numTables;                    /*number of tables, one-based*/
  260.     long                             mapOffset;                    /*offset to table that maps byte to token*/
  261.     long                             strOffset;                    /*offset to routine that copies canonical string*/
  262.     long                             fetchOffset;                /*offset to routine that gets next byte of character*/
  263.     long                             unTokenOffset;                /*offset to table that maps token to canonical string*/
  264.     long                             defPartsOffset;                /*offset to default number parts table*/
  265.     long                             whtSpListOffset;            /*offset to white space code list*/
  266.     long                             resOffset7;                    /*reserved*/
  267.     long                             resOffset8;                    /*reserved*/
  268.     short                             resLength1;                    /*reserved*/
  269.     short                             resLength2;                    /*reserved*/
  270.     short                             resLength3;                    /*reserved*/
  271.     short                             unTokenLength;                /*length of untoken table*/
  272.     short                             defPartsLength;                /*length of default number parts table*/
  273.     short                             whtSpListLength;            /*length of white space code list*/
  274.     short                             resLength7;                    /*reserved*/
  275.     short                             resLength8;                    /*reserved*/
  276. };
  277. typedef struct NItl4Rec                    NItl4Rec;
  278.  
  279. typedef NItl4Rec *                        NItl4Ptr;
  280. typedef NItl4Ptr *                        NItl4Handle;
  281.  
  282.  
  283. struct TableDirectoryRecord {
  284.     OSType                             tableSignature;                /*4 byte long table name */
  285.     unsigned long                     reserved;                    /*Reserved for internal use */
  286.     unsigned long                     tableStartOffset;            /*Table start offset in byte*/
  287.     unsigned long                     tableSize;                    /*Table size in byte*/
  288. };
  289. typedef struct TableDirectoryRecord        TableDirectoryRecord;
  290.  
  291. struct Itl5Record {
  292.     Fixed                             versionNumber;                /*itl5 resource version number */
  293.     unsigned short                     numberOfTables;                /*Number of tables it contains */
  294.     unsigned short                     reserved[3];                /*Reserved for internal use */
  295.     TableDirectoryRecord             tableDirectory[1];            /*Table directory records */
  296. };
  297. typedef struct Itl5Record                Itl5Record;
  298.  
  299. struct RuleBasedTrslRecord {
  300.     short                             sourceType;                    /*Transliterate target type for the LHS of the rule */
  301.     short                             targetType;                    /*Transliterate target type for the RHS of the rule */
  302.     short                             formatNumber;                /*Transliterate resource format number */
  303.     short                             propertyFlag;                /*Transliterate property flags */
  304.     short                             numberOfRules;                /*Number of rules following this field */
  305. };
  306. typedef struct RuleBasedTrslRecord        RuleBasedTrslRecord;
  307.  
  308.  
  309. struct ItlcRecord {
  310.     short                             itlcSystem;                    /*default system script*/
  311.     short                             itlcReserved;                /*reserved*/
  312.     SInt8                             itlcFontForce;                /*default font force flag*/
  313.     SInt8                             itlcIntlForce;                /*default intl force flag*/
  314.     SInt8                             itlcOldKybd;                /*MacPlus intl keybd flag*/
  315.     SInt8                             itlcFlags;                    /*general flags*/
  316.     short                             itlcIconOffset;                /*keyboard icon offset; not used in 7.0*/
  317.     SInt8                             itlcIconSide;                /*keyboard icon side; not used in 7.0*/
  318.     SInt8                             itlcIconRsvd;                /*rsvd for other icon info*/
  319.     short                             itlcRegionCode;                /*preferred verXxx code*/
  320.     short                             itlcSysFlags;                /*flags for setting system globals*/
  321.     SInt8                             itlcReserved4[32];            /*for future use*/
  322. };
  323. typedef struct ItlcRecord                ItlcRecord;
  324.  
  325. struct ItlbRecord {
  326.     short                             itlbNumber;                    /*itl0 id number*/
  327.     short                             itlbDate;                    /*itl1 id number*/
  328.     short                             itlbSort;                    /*itl2 id number*/
  329.     short                             itlbFlags;                    /*Script flags*/
  330.     short                             itlbToken;                    /*itl4 id number*/
  331.     short                             itlbEncoding;                /*itl5 ID # (optional; char encoding)*/
  332.     short                             itlbLang;                    /*current language for script */
  333.     SInt8                             itlbNumRep;                    /*number representation code*/
  334.     SInt8                             itlbDateRep;                /*date representation code */
  335.     short                             itlbKeys;                    /*KCHR id number*/
  336.     short                             itlbIcon;                    /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  337. };
  338. typedef struct ItlbRecord                ItlbRecord;
  339. /* New ItlbExtRecord structure for System 7.0 */
  340.  
  341. struct ItlbExtRecord {
  342.     ItlbRecord                         base;                        /*un-extended ItlbRecord*/
  343.     long                             itlbLocalSize;                /*size of script's local record*/
  344.     short                             itlbMonoFond;                /*default monospace FOND ID*/
  345.     short                             itlbMonoSize;                /*default monospace font size*/
  346.     short                             itlbPrefFond;                /*preferred FOND ID*/
  347.     short                             itlbPrefSize;                /*preferred font size*/
  348.     short                             itlbSmallFond;                /*default small FOND ID*/
  349.     short                             itlbSmallSize;                /*default small font size*/
  350.     short                             itlbSysFond;                /*default system FOND ID*/
  351.     short                             itlbSysSize;                /*default system font size*/
  352.     short                             itlbAppFond;                /*default application FOND ID*/
  353.     short                             itlbAppSize;                /*default application font size*/
  354.     short                             itlbHelpFond;                /*default Help Mgr FOND ID*/
  355.     short                             itlbHelpSize;                /*default Help Mgr font size*/
  356.     Style                             itlbValidStyles;            /*set of valid styles for script*/
  357.     Style                             itlbAliasStyle;                /*style (set) to mark aliases*/
  358. };
  359. typedef struct ItlbExtRecord            ItlbExtRecord;
  360.  
  361.  
  362.  
  363. #if PRAGMA_STRUCT_ALIGN
  364.     #pragma options align=reset
  365. #elif PRAGMA_STRUCT_PACKPUSH
  366.     #pragma pack(pop)
  367. #elif PRAGMA_STRUCT_PACK
  368.     #pragma pack()
  369. #endif
  370.  
  371. #ifdef PRAGMA_IMPORT_OFF
  372. #pragma import off
  373. #elif PRAGMA_IMPORT
  374. #pragma import reset
  375. #endif
  376.  
  377. #ifdef __cplusplus
  378. }
  379. #endif
  380.  
  381. #endif /* __INTLRESOURCES__ */
  382.  
  383.